//
//  CNGameUtil.h
//  chuiniu
//
//  Created by zheng ji on 14-9-29.
//  Copyright (c) 2014年 jxw. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CNPlayer.h"
@interface CNGameUtil : NSObject
+(CNPlayer*) getCurrentPlayerFromUserDefaults;
+(void)saveCurrentPlayerToUserDefaults:(CNPlayer*) player;
+(NSString*)CreateGUID;
//存放本地金币记录的路径
+ (NSString *) getLocalGoldPath;
+(void) writeContentToFile:(NSString*)content filePath:(NSString*) filePath;
+(NSString*) readContentFromFile:(NSString*)filePath;

/*将金币记录保存到本地*/
+(void) writeGoldContentToFile:(NSString*)content goldFileName:(NSString*) goldFileName;
/* 读取本地金币文件内容*/
+(NSString*) readGoldContentFromFile:(NSString*)goldFileName;

+(void)removeLocalFile:(NSString*)filePath;

//删除本地金币文件
+(void)removeLocalGoldFile:(NSString*)goldFileName;
//获得等级数据
+(NSArray*)getAllPlayerLevel;
//计算金币所处等级
+(NSString*)calcPlayerLevelName:(int)coins;
@end
